
<!-- Stores -->
<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gr="http://purl.org/goodrelations/v1#" 
xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> 
{% for store in stores %}
<div about="{{store.id}}" typeof="gr:Location">
	<div property="gr:name" content="{{store.name}}" xml:lang="{{store.language}}"></div>
{% if store.description %}
	<div property="gr:description" content="{{store.description}}" xml:lang="{{store.language}}"></div>
{% endif %}
{% if company_uri %}
	<div rev="gr:hasPOS" resource="{{company_uri}}"></div>
{% endif %}
{% if store.country %}
	<div rel="vcard:adr">
		<div about="{{store.addr_id}}" typeof="vcard:Address">
{% if store.country %}
			<div property="vcard:country-name" content="{{store.country}}" xml:lang="{{store.language}}"></div>
{% endif %}
{% if store.city %}
			<div property="vcard:locality" content="{{store.city}}" xml:lang="{{store.language}}"></div>
{% endif %}
{% if store.zip %}
			<div property="vcard:postal-code" content="{{store.zip}}" datatype="xsd:string"></div>
{% endif %}
{% if store.street %}
			<div property="vcard:street-address" content="{{store.street}}" xml:lang="{{store.language}}"></div>
{% endif %}
		</div>
	</div>
{% endif %}
{% if store.phone %}
	<div property="vcard:tel" content="{{store.phone}}"></div>
{% endif %}
{% if store.lat %}
{% if store.long %}
	<div rel="vcard:geo">
		<div>
			<div property="vcard:latitude" content="{{store.lat}}" datatype="xsd:float"></div>
			<div property="vcard:longitude" content="{{store.long}}" datatype="xsd:float"></div>
		</div>
	</div>
{% endif %}
{% endif %}
{% if store.logo_uri %}
	<div rel="foaf:logo" resource="{{store.logo_uri}}"></div>
{% endif %}
	<div rel="foaf:page" resource="{{store.page}}"></div>
{% if store.gln %}
	<div property="gr:hasGlobalLocationNumber" content="{{store.gln}}" datatype="xsd:string"></div>
{% endif %}
{% for hours in store.opening_hours %}
	<div rel="gr:hasOpeningHoursSpecification">
		<div typeof="gr:OpeningHoursSpecification">
			<div property="gr:opens" content="{{hours.opens}}" datatype="xsd:time"></div>
			<div property="gr:closes" content="{{hours.closes}}" datatype="xsd:time"></div>
{% for day in hours.days %}
			<div rel="gr:hasOpeningHoursDayOfWeek" resource="http://purl.org/goodrelations/v1#{{day}}"></div>
{% endfor %}
{% if hours.valid_from %}
{% if hours.valid_through %}
			<div property="gr:validFrom" datatype="xsd:dateTime" content="{{hours.valid_from}}"></div>
			<div property="gr:validThrough" datatype="xsd:dateTime" content="{{hours.valid_through}}"></div>
{% endif %}
{% endif %}
		</div>
	</div>
{% endfor %}
</div>
{% endfor %}
</div>